import request from '@/utils/request'

// 查询盘点调整单列表
export function listAdjust(query) {
  return request({
    url: '/stock/checkadjust/list',
    method: 'post',
    data: query
  })
}

// 查询盘点调整单详细
export function getAdjust(id) {
  return request({
    url: '/stock/checkadjust/' + id,
    method: 'get'
  })
}

// 新增盘点调整单
export function addAdjust(data) {
  return request({
    url: '/stock/checkadjust/add',
    method: 'post',
    data: data
  })
}

// 修改盘点调整单
export function updateAdjust(data) {
  return request({
    url: '/stock/checkadjust/update',
    method: 'post',
    data: data
  })
}

// 删除盘点调整单
export function delAdjust(id) {
  return request({
    url: '/stock/checkadjust/delete/' + id,
    method: 'post'
  })
}

// 确认调整
export function confirm(data) {
  return request({
    url: '/stock/checkadjust/confirm',
    method: 'post',
    data: data
  })
}

// 关闭
export function closeAdjust(id) {
  return request({
    url: '/stock/checkadjust/close/' + id,
    method: 'post'
  })
}

/** 盘点单附件上传 */
export function uploadAdJustFile(data){
  return request({
    url: `/stock/checkadjust/uploadAdJustFile`,
    method: 'post',
    data: data
  });
}